{% load i18n %}
<div class="fill"></div>
<div class="centered">
        <div class="card edit-voting">

        <div class="card-header">
            <h1 class="text-left">{% trans "Report voting" %}</h1>
            <div class="close close-icon" onclick="close_report()"></div>
        </div>

        <div class="card-body">
                <p>{% trans "Please describe what rules this voting violates in the field below" %}</p>
                    <h2 class="inline-elements">{% trans "Voting ID:" %}</h2>
                      <div class="text-field">
                        <form action="/new_report/" method="post" id="report_form">
                            {% csrf_token %}
                            {{form.target_poll}}
                            {{form.description}}
                            <input type="submit" class="create mx-auto" value='{% trans "Submit" %}'>
                        </form>
                      </div>
                    </div>
        </div>

    <div class="error-container"></div>
</div>

<script>
    $('#report_form').on('submit', function(event){
    event.preventDefault();
    send_report();
});
</script>